import { lazy } from "react";
import {createBrowserRouter} from 'react-router-dom'

let Home=lazy(()=>import('../pages/home/Index'))
let Login=lazy(()=>import('../pages/login/Index'))
let Error=lazy(()=>import('../pages/404/Index'))

let routes=createBrowserRouter([
    {
        path:'/',
        element:<Home></Home>
    },
    {
        path:'/home',
       element:<Home></Home>
    },
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'*',
        element:<Error></Error>
    }
])

export default routes